A multi-level NAND flash memory, for example, which is capable of storing a plurality of bits in a memory cell has a lower page and an upper page, for example, wherein data of the lower page are written first, and then data of the upper page are written. When writing the data of the upper page after writing the data of the lower page, the data of the lower page can be destructed in the case where power is turned off or a write defect occurs during the writing.